<template>
  <div class="outer">
    <!-- 当传入给子组件的数据不一样是 使用插槽 自定义内容 -->
    <Tab title="美食">
      <img
        width="200"
        src="https://img2.baidu.com/it/u=2082735800,426564252&fm=253&fmt=auto&app=138&f=GIF?w=400&h=300"
        alt=""
      />
    </Tab>
    <Tab title="游戏">
      <ul>
        <li>LoL</li>
        <li>CF</li>
        <li>DNF</li>
      </ul>
    </Tab>
    <Tab title="电影">
      <!-- autoplay muted 自动播放 静音 -->
      <video src="./01.mp4" width="200" autoplay muted></video>
    </Tab>
  </div>
</template>

<script>
import Tab from "./components/Tab";
import { v4 as uuidv4 } from "uuid";

export default {
  name: "App",
  data() {
    return {
      tabData: [
        { id: uuidv4(), title: "美食", list: ["火锅", "烧烤", "小龙虾"] },
        { id: uuidv4(), title: "游戏", list: ["LoL", "DNF", "CS", "Dota"] },
        {
          id: uuidv4(),
          title: "电影",
          list: ["独行月球", "智取威虎山", "绿皮书"],
        },
      ],
    };
  },
  components: {
    Tab,
  },
  methods: {},
};
</script>

<style scoped>
/* scoped  当前文件可以使用*/
.outer {
  height: 400px;
  background: yellowgreen;
  display: flex;
  justify-content: space-around;
}
</style>

